package com.me.collector.items;

import java.util.ArrayList;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.physics.box2d.CircleShape;
import com.badlogic.gdx.physics.box2d.Shape;
import com.me.collector.Definitions;
import com.me.collector.Definitions.ItemType;
import com.me.collector.FallingItems;
import com.me.collector.FallingObject;
import com.me.collector.FallingObjectList;
import com.me.collector.Hero;
import com.me.collector.Item;

public class Apple extends Item
{
	public Apple()
	{
		super("items/apple.png", 32, 32, 200);
	}
	@Override
	public ArrayList<Shape> createShapes() {
		ArrayList<Shape> shapes = new ArrayList<Shape>();
		// circle Shape	
		CircleShape c = new CircleShape();
		c.setRadius(height * Definitions.WORLD_TO_BOX / 2f);
		c.setPosition(new Vector2(width * Definitions.WORLD_TO_BOX / 2f, height * Definitions.WORLD_TO_BOX / 2f));
		
		shapes.add(c);
		
		return shapes;
	}

	@Override
	public void effect(Hero hero, FallingObject o, FallingItems fItems) {
		hero.getContainer().AddItem(this);
		o.remove();
	}
	@Override
	public ItemType getType() {
		return ItemType.apple;
	}
}